export default{
    namespace:'main',
    state:{
        theModule:'statistics',
        pageIndex:"",  //当前页面
    },
    effects:{
        *skip({payload,callback},{call,put}){
            yield put({
                type:'updateMudule',
                ...payload
            })
        },
        *doLoginOut({payload},{call,put}){
           sessionStorage.setItem('userInfo',null);
           window.location.half = '/login';
         //   console.log( window.location)
             
        }
    },
    reducers: {  //合并state,payload，更新state 
        updateMudule(state,payload) {
          return {
            ...state,
            ...payload,
          }
        }, 
    }
}